
package Controller;

import com.mysql.jdbc.Connection;
import com.mysql.jdbc.Statement;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;


public class Conexion {
    private static Statement st;
    public static Statement conectar(){ 
    Connection conexion;
        try {
            conexion = (Connection) DriverManager.getConnection ("jdbc:mysql://localhost/ficcion","root", "4932273");
            st = (Statement) conexion.createStatement();
        } catch (SQLException ex) {
            Logger.getLogger(Conexion.class.getName()).log(Level.SEVERE, null, ex);
        }
         return st;
    }
}
